home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-3417 / gfa_prog.s / gfamusic.lst < prev    next >
File List  |  1989-04-05  |  2KB  |  34 lines

  1. INLINE music%,22000
  2. '                                     ! inline is for reserving some space to
  3. '                                     ! put the music in.
  4. DIM reg%(16)                          ! dimension some space
  5. '
  6. DO                                    ! oke lets start...
  7.   FILESELECT "a:\music\*.thk","",fnam$! fileselector to choose music.
  8.   IF fnam$<>""                        ! if name isn't nothing then
  9.     BLOAD fnam$,music%                ! load music into reserved space
  10.     musix_on                          ! gosub routine to start music
  11.     ~INP(2)                           ! wait for key press
  12.     musix_off                         ! stop music
  13.   ELSE                                ! if name is nothing then
  14.     musix_off                         ! stop music
  15.     END                               ! back to basic or if compiled desktop
  16.   ENDIF                               ! end
  17. LOOP                                  ! goto start again to do it all over again
  18. PROCEDURE musix_on
  19.   do%=GEMDOS(&H20,L:0)                ! supervisor mode
  20.   reg%(0)=1                           ! choose music
  21.   RCALL music%,reg%()                 ! music call
  22.   SLPOKE &H4D2,music%+8               ! begin address music diskmagazine 2
  23.   ' SLPOKE &H4D2,music%+4             ! begin address music diskmagazine 1
  24.   ~GEMDOS(&H20,L:do%)                 ! user mode
  25. RETURN
  26. '
  27. PROCEDURE musix_off
  28.   do%=GEMDOS(&H20,L:0)                ! supervisor mode
  29.   SLPOKE &H4D2,0                      ! stop music
  30.   WAVE 0,0,0,0                        ! all sound off
  31.   ~GEMDOS(&H20,L:do%)                 ! user mode kiezen
  32. RETURN
  33. '
  34.